<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
 *奖励
 *@author zhu
 *@time 20150801
 */
class Kf_model extends CI_Model {
	function __construct(){
        parent::__construct();
    }
    
    function add($data = array()){
		$this->db->insert('rsh_kf', $data);
		return $this->db->affected_rows();
    }
    
    
    function get_one($where = array(),$select='*'){
		$this->db->select($select);
		if($where){
			$this->db->where($where);
		}
		$this->db->limit(1);
		$query = $this->db->get('rsh_kf');
		return $query->row_array();
    }

    function get_all(){
		$select = "select * from rsh_kf";	
		$query = $this->db->query($select);
		$retsult = $query->result_array();
		return $retsult;
    }	   

}


